#include <iostream>
using namespace std;
int main()
{
   int CurYear, Age, Year;
   cout << "Nam hien tai:";
   cin >> CurYear;
   cout << "Tuoi cua ban:";
   cin >> Age;
   cout << "Tinh tuoi nam:";
   cin >> Year;
   while ( Year < CurYear - Age )
   {
      cout << "Nam tinh phai lon hon nam sinh" << endl;
      cout << "Tinh tuoi nam:";
      cin >> Year;
   }
   cout << "Nam " << Year << " ban " << Year - ( CurYear - Age ) << " tuoi" << endl;
   system ("pause");
   return 0;
}
